#include <iostream>
#include <stdio.h>
#ifndef COMPLEX_H
#define COMPLEX_H
class Complex
{
	private:
		double re;
		double im;
	public:
		Complex();
		Complex(double x, double y);
		Complex(const Complex *c);
		Complex(const Complex &c);
		~Complex();
		double getReal(void) const;
		void setReal(double real);
		double getImag(void) const;
		void setImag(double real);
		Complex Sum(const Complex *z);
		Complex Sum(const Complex &z);
		Complex Sum(double d);
		Complex Substraction(const Complex *z);
		Complex Substraction(const Complex &z);
		Complex Substraction(double d);
		Complex Multiplication(const Complex *z);
		Complex Multiplication(const Complex &z);
		Complex Multiplication(double d);
		Complex Division(const Complex *z);
		Complex Division(const Complex &z);
		Complex Division(double d);
		Complex Sqrt(void);
		Complex operator + (const Complex *b);
		Complex operator + (const Complex &b);
		Complex operator + (double d);
		friend Complex operator + (double d, const Complex &z);
		Complex operator - (const Complex *b);
		Complex operator - (const Complex &b);
		Complex operator - (double d);
		friend Complex operator - (double d, const Complex &z);
		Complex operator * (const Complex *b);
		Complex operator * (const Complex &b);
		Complex operator * (double d);
		friend Complex operator * (double d, const Complex &z);
		Complex operator ^ (int power);
		Complex operator / (const Complex *b);
		Complex operator / (const Complex &b);
		Complex operator / (double d);
		friend Complex operator / (double d, const Complex &z);
		Complex operator = (const Complex *z);
		Complex operator = (const Complex &z);
		Complex operator = (double d);
		bool operator == (const Complex *z);
		bool operator == (const Complex &z);
		bool operator == (double d);
		friend bool operator == (double d, const Complex &z);
		bool operator < (const Complex *z);
		bool operator < (const Complex &z);
		bool operator < (double d);
		friend bool operator < (double d, const Complex &z);
		bool operator <= (const Complex *z);
		bool operator <= (const Complex &z);
		bool operator <= (double d);
		friend bool operator <= (double d, const Complex &z);
		bool operator > (const Complex *z);
		bool operator > (const Complex &z);
		bool operator > (double d);
		friend bool operator > (double d, const Complex &z);
		bool operator >= (const Complex *z);
		bool operator >= (const Complex &z);
		bool operator >= (double d);
		friend bool operator >= (double d, Complex &z);
		Complex operator ++ (void);		
		Complex operator -- (void);
		friend std::istream& operator >> (std::istream &in, Complex &c);
		friend std::ostream& operator << (std::ostream &out, Complex c);
};
#endif	//end of COMPLEX_H